#pragma once

#include <memory>

#include "render/RendererAPI.h"

namespace Cogs {
	class OpenGLRendererAPI :public RendererAPI {
	public:
		OpenGLRendererAPI();
		virtual void Initial() override;
		virtual void SetViewPort(int x, int y, int w, int h) override;
		virtual void ClearBuffer() override;
		virtual void DrawIndex(const std::shared_ptr<VertexArray>& vertexArray, uint32_t indexCount,
			const std::string& shaderName = "ColorShader") override;
		virtual void ClearColor(const glm::vec4& color) override;

		virtual void CreateUserShader(const std::string& name,
			const std::unordered_map<ShaderType, std::string>& shaderTypeAndSorce) override;
		virtual void LoadUserShader(const std::string& name,
			const std::unordered_map<ShaderType, std::string>& shaderTypeAndFilePath) override;
		virtual std::shared_ptr<Shader> GetUserShader(const std::string& shaderName) override;
	};
}